﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity;
using Guline.Web.LiveModels.Models;

namespace Guline.Web.LiveModels.DataContext
{
    public class DataContext : DbContext
    {
        public DataContext()
            : base("DefaultConnection")
        { 
            Database.SetInitializer<DataContext>(new CreateDatabaseIfNotExists<DataContext>());
            //Database.SetInitializer<DataContext(null)>;
        }

        public DbSet<User> Users { get; set; }
        public DbSet<Room> Rooms { get; set; }
        public DbSet<Message> Messages { get; set; }
        public DbSet<Room_member> Room_members { get; set; }

    }
}
